//智能表单
function NW06(fq) {
    //nw
    this.nw = fq;
    this.bds = new NW06_jyk()

    //智能表单里面的按键对象
    this.znbd = [];
}

NW06.prototype.qd0 = function () {
    //不包含body节点本身
    this.ngj_zc(this.nw.st.Jiedian);
}
/**
 * 对jd内进行布局.调整儿子 
 * @param {对象} nwJD nw封装的节点对象
 */
NW06.prototype.ngj_zc = function (jd) {
    let _sx = jd.getAttributeNode('znbd');
    if (_sx) {
        this.cj(jd)
        return;
    }
    let _NWerziM = jd.children;
    let ez1;
    for (let i = 0; i < _NWerziM.length; i++) {
        ez1 = _NWerziM[i];
        switch (ez1.nodeName) {
            case 'BJ':
            case 'BUJU':
            case 'NR':
            case 'DIV':
                this.ngj_zc(ez1);
        }
    }
}


//节点
NW06.prototype.cj = function (jd) {
    let gt = this.hq(jd);
    if (gt) {
        return gt;
    }
    gt = new NW06_gt(this.nw, this.nw.cj2(jd));
    this.znbd.push(gt);
    return gt;
}

//优先角色。找不到角色，再找id
NW06.prototype.hq = function (jd_znbd) {
    if (typeof jd_znbd == 'string') {
        let gt = this.ngj_hqGT('znbd', NWHS_sck(jd_znbd))
        if (gt) {
            return gt;
        }
        jd_znbd = document.getElementById(jd_znbd);
    }
    return this.ngj_hqGT('jd', jd_znbd)
}



NW06.prototype.ngj_hqGT = function (hc_ming, zhi) {
    for (let i = 0; i < this.znbd.length; i++) {
        if (this.znbd[i][hc_ming] == zhi) {
            return this.znbd[i];
        }
    }
}